import { http } from '@/utils/http'

// 获取申请列表
export function getApplyList(data) {
    return http({
        url: '/system/visitor/',
        method: 'get',
        data: data
    })
}

// 获取待审核列表
export function getCheckList(data) {
    return http({
        url: '/system/visitor/pending/',
        method: 'get',
        data: data
    })
}

// 获取已审核列表
export function getCheckedList(data) {
    return http({
        url: '/system/visitor/completed/',
        method: 'get',
        data: data
    })
}

// 审核通过
export function checkPass(id) {
    return http({
        url: `/system/visitor/${id}/approve/`,
        method: 'post',
    })
}

// 拒绝申请
export function checkRefuse(id) {
    return http({
        url: `/system/visitor/${id}/reject/`,
        method: 'post',
    })
}